<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
<title>欢迎登陆</title>
<link rel="stylesheet" type="text/css" href="../css/bootstrap/bootstrap.min.css"/>
<style type="text/css">
    #table_login tr td{
        font-weight: bold;
        color: white;
    }
</style>
<script type="text/javascript" src="../js/jquery.min.js"></script>
<script type="text/javascript" src="../js/bootstrap/bootstrap.min.js"></script>
<script type="text/javascript">
    $("document").ready(function(){
        $("#loginModal").modal({backdrop:'static'});

        $("#button_login").click(function(){
            if($("#savePwd").prop("checked")){
                localStorage.setItem("account", $("#account").val());
                localStorage.setItem("password", $("#password").val());
            }else{
                localStorage.removeItem("account");
                localStorage.removeItem("password");
            }
            $("#form_login").submit();
        });

        //登录按钮响应回车键
        $("body").keypress(function(e){
            if(e.keyCode == 13){
                $("#button_login").click();
            }
        });
    });
</script>
</head>
<body>
<div class="container">
    <div style="width: 100%; height: 700px; background-image: url(/images/login.jpg); background-repeat: no-repeat; padding-top: 30%;">
        <div style="width: 300px; height: 200px; margin-left: 75%;">
            <form th:action="@{/employee/login}" id="form_login" class="form-horizontal" method="POST" target="_top">
                <table id="table_login">
                    <tr th:height="30px">
                        <td>账号：</td>
                        <td style="color: black; font-weight: normal;"><input name="account" id="account" placeholder="请输入邮箱/手机号" autocomplete="off" style="width: 150px;"></td>
                    </tr>
                    <tr th:height="30px">
                        <td>密码：</td>
                        <td style="color: black; font-weight: normal;" ><input type="password" name="password" id="password" placeholder="请输入密码" style="width: 150px;"></td>
                    </tr>
                </table>
            </form>
        </div>
        <div style="margin-top: 10px; margin-left: 50%;">
            <button type="button" id="button_login" style="background-image: url('/images/image_login.png'); width: 70px; height: 27px;"></button>
            <br>
            <span style="font-size:12px; color:red; float:left; margin-left:80px;" th:text="${loginInfo}"></span>
        </div>
    </div>
</div>
</body>
</html>
